# -*- coding:utf-8 -*-
import web, hashlib, memcache

db = web.database(dbn='mysql',db='insurance_case',user='root',pw='1234',charset='utf8', pooling=False)

#缓存
memc = memcache.Client(['127.0.0.1:11211'])

def mem_hash(obj):
    m=hashlib.md5()
    m.update(obj)
    key=m.hexdigest()
    return key

import os
for modulefile in os.listdir(os.path.dirname(__file__)):
    if modulefile.endswith('.py') and not modulefile.startswith('__'):
        moduleName = os.path.splitext(modulefile)[0]
        importstring = 'import ' + moduleName
        exec importstring
